#ifndef _DATA_H_
#define _DATA_H_

#include "wx/wx.h"
#include "wx/config.h"
#include "wx/textfile.h"
#include "listctrlItem.h"
#include "libpq-fe.h"
//#include "slposapp.h"

class CashierData
{
    public:
        CashierData(PGconn* dbconn);
        ~CashierData();
        bool SaveOrder(wxDateTime TransDate, bool IsCashPayment, listctrlItem* ItemList);
        wxString CreatePrintReceipt(wxDateTime TransDate, listctrlItem* ItemList, long Payment, bool IsCash);
        
        wxString GetLastError() const { return LastError ; }
        
    private:
        PGconn      *conn;
        wxConfig    *config;
        wxString    LastError;
                
        wxString    DefaultCustomer;
        wxString    CashAccount;
        wxString    CardAccount;
        wxString    ARaccount;

        wxString    MarginTop;
        wxString    MarginLeft;

        wxString    CompanyName;
        wxString    CompanyAddress;
        wxString    CompanyPhone;
        wxString    PrintFooter;

};
#endif
